<%-- 
    Document   : login
    Created on : 08-mar-2011, 18:30:50
    Author     : wadjakman
--%>

<%@page import="com.coninbell.ssbresources.Auth"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%
  String user = request.getParameter("user");
  String password = request.getParameter("password");
  boolean loginOk = Auth.login(user, password);
  if (loginOk)
  {
    session.setAttribute("userName", user);
  }
%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Identificación</title>
    <link rel="stylesheet" type="text/css" href="css/core.css">
  </head>
  <body>
    <div class="alignCenter fonts">
      <div class="infoBox alignLeft">
        <h3>Resources for Simple Site Builder</h3>
        <br>
        <hr></hr>
        <% if (loginOk) { %>
          <b>Usuario identificado correctamente</b><br>
          Redireccionando ...
          <script type="text/javascript">
            window.setTimeout("window.location.href='services.jsp'", 4000);
          </script>
        <% } else { %>
          El usuario o la contraseña no son correctos, verifícalos e intenta de
          nuevo. 
          <br>
          <button type="button" class="warnButton mainButton vmargin5" onclick="location.href='index.jsp#login'">Volver al inicio</button>
        <% } %>
      </div>
    </div>
  </body>
</html>
